package made.ann;

public class ActivationFunctions {

	public ActivationFunctions() {}
	
	public float threshold(float lowValue, float highValue, float threshold, float inputValue) 
	{
		float result = (inputValue >= threshold) ? highValue : lowValue;
		
		return result;
	} 

	public float sigmoid(float x, float sharpness) 
	{
		double result = 1 / (1 + Math.exp(-sharpness * x));
		
		return (float)result;
	}
	
	public float linear(float inputValue, float scale)
	{
		float result = inputValue * scale;
		
		return result;
	}
	
	public float hyperbolTangent(float inputValue)
	{
		double result = Math.tanh(inputValue);
		
		return (float)result;
	}
	
}
